﻿
Partial Class UserControl_ucHeader
    Inherits System.Web.UI.UserControl

    Dim strInternetURL As String = ConfigurationManager.AppSettings("InternetURL").ToString

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim strDemoURL As String = Request.Url.ToString

        ltHome.Text = "<a href='" & strInternetURL & "Home/Home.aspx?Demo=" & strDemoURL & "&BrowseSource=Demo' style='font-size:11px; color:White; text-decoration:none'>主页</a> &nbsp;| &nbsp;"
        ltDownloads.Text = "<a href='" & strInternetURL & "Downloads/Downloads.aspx?Demo=" & strDemoURL & "&BrowseSource=Demo' style='font-size:11px; color:White; text-decoration:none'>下载</a> &nbsp;| &nbsp;"
        ltPurchase.Text = "<a href='" & strInternetURL & "Purchase/Purchase.aspx?Demo=" & strDemoURL & "&BrowseSource=Demo' style='font-size:11px; color:White; text-decoration:none'>购买</a> &nbsp;| &nbsp;"
        ltSupport.Text = "<a href='" & strInternetURL & "Support/Support.aspx?Demo=" & strDemoURL & "&BrowseSource=Demo' style='font-size:11px; color:White; text-decoration:none'>支持</a>"

        BrowseLog()
    End Sub

    Private Sub BrowseLog()
        If Not Page.IsPostBack Then
            Try
                If Session("DemoSuccessed") Is Nothing Then
                    Session("DemoSuccessed") = "True"
                    Dim wc As New System.Net.WebClient
                    Dim uri As New System.Uri(strInternetURL & "Home/Home.aspx?BrowseSource=DemoSuccessed")
                    wc.OpenRead(uri)
                End If
            Catch ex As Exception
                Err.Clear()
            End Try
        End If
    End Sub
End Class
